<div id="pm_settings">
    <div class="settings securityContainer" >
        <div class="row pm_grid">
            <section class="pm_form col-1-2">
                <header-block class="settingsSecurity-header-2fa">
                    <h2
                        class="settingsSecurity-title-2fa"
                        translate
                        translate-comment="two factor page heading"
                        translate-context="Title">Two-Factor Authentication</h2>
                </header-block>

                <button class="pm_button" ng-show="twoFactor === 1" ng-click="disableTwoFactor()" translate-context="Action" translate>Disable Two-Factor Authentication</button>
                <button class="pm_button" ng-show="twoFactor === 0" ng-click="enableTwoFactor()" translate-context="Action" translate>Enable Two-Factor Authentication</button>
                <a href="https://protonmail.com/support/knowledge-base/two-factor-authentication/" target="_blank" class="pm_button link" translate translate-context="Link">Learn more</a>
            </section>

            <section class="pm_form col-1-2">
                <header-block class="settingsSecurity-header-session">
                    <h2
                        class="settingsSecurity-title-session"
                        translate
                        translate-comment="other sessions page heading"
                        translate-context="Title">Session Management</h2>
                </header-block>
                <p>
                    <button type="button" class="pm_button" ng-click="revokeOthers()" translate-context="Action" translate>Revoke all other sessions</button>
                    <a href="https://protonmail.com/support/knowledge-base/log-out-all-other-sessions/" target="_blank" class="pm_button link" translate translate-context="Link">Learn more</a>
                </p>
                <div class="pm_table activeSessions-table">
                    <table class="bordered">
                        <tbody>
                            <tr ng-repeat="session in activeSessions track by $id(session)">
                                <td>
                                    <strong>{{ ::session.client }}</strong>
                                    <br />
                                    <code>{{ ::session.username }}</code>
                                    <time pt-tooltip="{{ ::session.CreateTime * 1000 | date : 'medium' }}">{{ ::session.createTime }}</time>
                                </td>
                                <td class="text-right">
                                    <span ng-if="session.isCurrentSession" class="pm_badge primary" translate-context="Badge in the active sessions table" translate>Current session</span>
                                    <button ng-if="session.Revocable && !session.isCurrentSession" ng-click="revoke(session.UID)" type="button" class="pm_button link" translate-context="Action in the active sessions table" translate>Revoke</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <p class="help" translate-context="Info about active sessions" translate>Unless you explicitly logout or change your password, sessions can last for up to 6 months. Sessions expire after 2 weeks of inactivity.</p>
            </section>
        </div>
        <div class="row">
            <log-manager class="setting pm_form full"></log-manager>
        </div>
        <encryption-view></encryption-view>
    </div><!--/.settings-->
</div><!--/#pm_settings-->
